﻿<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="EmpRewardsList.aspx.cs"
    Inherits="UI.ModEmployee.EmpRewardsList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>奖惩记录列表</title>
    <link rel="stylesheet" type="text/css" href="../Styles/BaseStyle.css" />
    <script type="text/javascript" src="../JS/jsFunction.js"></script>
    <script src="../JS/calendar.js" type="text/javascript"></script>
</head>
<body >
    <form id="form1" runat="server">
    <div id="pagetop" class="pagetop">
        <div class="pagetopleft">
            奖惩记录</div>
        <div class="pagetopright">
            工号<asp:TextBox ID="txtSerWord" runat="server" CssClass="InputCss" Width="75px"></asp:TextBox>
            日期<asp:TextBox ID="txtBtime" runat="server" CssClass="InputCss" Width="75px"  maxlength="10" onclick="setday(this,false)" onkeypress="return validateKey(this,false, getkeyCode(event));" style="ime-mode:Disabled;" ></asp:TextBox>
            至<asp:TextBox ID="txtEtime" runat="server" CssClass="InputCss" Width="75px"  maxlength="10" onclick="setday(this,false)" onkeypress="return validateKey(this,false, getkeyCode(event));" style="ime-mode:Disabled;" ></asp:TextBox>
            <asp:DropDownList ID="ddlRewardsTypeName" runat="server" CssClass="InputCss">
            </asp:DropDownList>
            <asp:DropDownList ID="ddlDeptID" runat="server" CssClass="InputCss">
            </asp:DropDownList>
            <asp:Button ID="btnEmSearch" runat="server" Text="查询" OnClick="btnEmSearch_Click"
                CssClass="ButtonCss" />
            <asp:Button ID="btnExcel" runat="server" Text="导出" CssClass="ButtonCss" OnClick="btnExcel_Click" />
            <asp:Button ID="btnAdd" runat="server" Text="增加" CssClass="ButtonCss" />
            &nbsp;
        </div>
    </div>
    <asp:GridView ID="gvList" runat="server" DataKeyNames="RewardsID" Width="1250" AutoGenerateColumns="False"
        GridLines="Horizontal" OnRowDataBound="gvList_RowDataBound" CssClass="td">
        <Columns>
            <asp:BoundField DataField="RewardsID" HeaderText="RewardsID" SortExpression="RewardsID">
            </asp:BoundField>
             <asp:BoundField DataField="RewardsTime" HeaderText="奖惩时间" SortExpression="RewardsTime"
                DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center">
                <ItemStyle Width="90px" />
            </asp:BoundField>
             <asp:BoundField DataField="DeptName" HeaderText="部门" SortExpression="DeptName">
                <ItemStyle Width="70px" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="员工工号" SortExpression="EmpCode" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <a href="javascript:ShowLink('EmpRewardsAdd.aspx?RewardsID=<%# Eval("RewardsID")%>',800,550)">
                        <%# Eval("EmpCode")%></a>
                </ItemTemplate>
                <ItemStyle Width="80px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="员工姓名" SortExpression="EmpName" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <a href="javascript:ShowLink('EmpRewardsAdd.aspx?RewardsID=<%# Eval("RewardsID")%>',800,550)">
                        <%# Eval("EmpName")%></a>
                </ItemTemplate>
                <ItemStyle Width="80px" />
            </asp:TemplateField>
           
            <asp:BoundField DataField="DutyName" HeaderText="职务" SortExpression="DutyName">
                <ItemStyle Width="80px" />
            </asp:BoundField>
            <asp:BoundField DataField="StateName" HeaderText="在职状态" SortExpression="StateName">
                <ItemStyle Width="70px" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="事由" SortExpression="RewardsReason">
                <ItemTemplate>
                    <%# Eval("RewardsReason").ToString().Length > 60 ? Eval("RewardsReason").ToString().Substring(0, 60) + ". . ." : Eval("RewardsReason")%>                   
                </ItemTemplate>
                <ItemStyle Width="150px" />
            </asp:TemplateField>
            <asp:BoundField DataField="ReJ" HeaderText="奖励类型" SortExpression="ReJ">
                <ItemStyle Width="100px" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="奖励金额" SortExpression="ReA">
                <ItemTemplate>
                    <%# Eval("ReA").ToString() == "" ? "" : (Eval("ReA").ToString() + Eval("ReU").ToString())%> 
                </ItemTemplate>
                <ItemStyle Width="80px" />
            </asp:TemplateField>
              <asp:BoundField DataField="WaJ" HeaderText="惩罚类型" SortExpression="WaJ">
                <ItemStyle Width="100px" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="惩罚金额" SortExpression="WaA">
                <ItemTemplate>
                    <%# Eval("WaA").ToString() == "" ? "" : (Eval("WaA").ToString() + Eval("WaU").ToString())%>
                </ItemTemplate>
                <ItemStyle Width="80px" />
            </asp:TemplateField>
           
             <asp:TemplateField HeaderText="备注" SortExpression="Memo">
                <ItemTemplate>
                    <%# Eval("Memo").ToString().Length > 80 ? Eval("Memo").ToString().Substring(0, 80) + ". . ." : Eval("Memo")%>                   
                </ItemTemplate>
                <ItemStyle Width="300px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div id="divAmount" class="amountLine">
        <asp:Label ID="lbAmount" runat="server"></asp:Label>
    </div>
    </form>
    <br />
</body>
</html>
